import Vue from 'vue'
import App from './App.vue'

// 导入路由对应组件
import Index from '@/views/Index.vue'
import My from '@/views/My.vue'
import Classify from '@/views/Classify.vue'
import Order from '@/views/Order.vue'




Vue.config.productionTip = false

// 导入路由
import VueRouter from 'vue-router'
// 使用路由插件
Vue.use(VueRouter)

const routes = [
	{
		path: '/',
		redirect: '/Index'
	},
	{
		path: '/Index',
		component: Index
	},
	{
		path: '/my',
		component: My
	},
	{
		path: '/Classify',
		component: Classify
	},
	{
		path: '/Order',
		component: Order
	},


]
// 创建路由对象 -  传入规则
const router = new VueRouter({
	routes,
	mode: 'history'
})
new Vue({
	router,
	render: (h) => h(App),
}).$mount('#app')
